%ul.fg-control-bar{ :class => tag_class }

  %li.fg-button-prev{ :title => t(:"actions.prev", :default => "Previous page", :scope => Fancygrid.i18n_scope) }
  %li
    %span
      = I18n.t(:"pagination.page", :default => "Page", :scope => Fancygrid.i18n_scope)
    %span.fg-current-page
      = fancygrid.view_state.pagination_page
    %span
      = I18n.t(:"pagination.of", :default => "of", :scope => Fancygrid.i18n_scope)
    %span.fg-total-pages
      = fancygrid.page_count
  %li.fg-button-next{ :title => t(:"actions.next", :scope => Fancygrid.i18n_scope, :default => "Next page") }

  %li.separator
  
  %li
    %span
      = I18n.t(:"pagination.go_to", :default => "Go to page", :scope => Fancygrid.i18n_scope)
    = text_field_tag(:page, fancygrid.view_state.pagination_page, :class => "fg-current-page")
      
  %li
    = select_tag(:per_page, options_for_select(fancygrid.per_page_values, fancygrid.per_page_value), :class => "fg-per-page")
    
  %li.separator
  
  %li.fg-button-search{ :title => t(:"actions.search", :default => "Search", :scope => Fancygrid.i18n_scope) }
  %li.fg-button-refresh{ :title => t(:"actions.reload", :default => "Reload", :scope => Fancygrid.i18n_scope) }
  %li.fg-button-clear{ :title => t(:"actions.reset", :default => "Reset", :scope => Fancygrid.i18n_scope) }
      
  - if fancygrid.sort_window?
    %li.fg-button-sort{ :title => t(:"actions.sort", :default => "Sort columns", :scope => Fancygrid.i18n_scope) }
  
  = yield :"fancygrid_#{fancygrid.name}_buttons"